import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
    state: {
		goodsList:[{
			name:'张三'
		}]
	},
    mutations: {
		setState(state,n){
			state.goodsList = n
		}
	},
    actions: {
		setGoodsList(x,n){
			x.commit('setState',n)
		}
	},
	getters:{
		getGoodsList(state){
			return state.goodsList
		}
	}
})
export default store